package practice1_100;

import java.util.Arrays;
import java.util.Queue;
import java.util.concurrent.LinkedBlockingQueue;

public class fblq {
    public int f(int n){
        int[] dp=new int[n+1];
        Arrays.fill(dp,-1);
        return ff(n,dp);

    }
    public int ff(int n,int[] dp){
        if(dp[n]!=-1) return dp[n];
        if(n==1||n==2) return 1;
        if (n<=0) return 0;
        dp[n]= ff(n-1,dp)+ff(n-2,dp);
        return dp[n];
    }

    public static void main(String[] args) {
        System.out.println(new fblq().f(500));
        System.out.println("sssss");
    }
}
